﻿using Microsoft.AspNetCore.DataProtection.KeyManagement;

namespace Nasty.Core.SuperExtension
{
    public static class ObjectExtension
    {
        public static bool IsList(this object obj)
        {
            if (obj == null) return false;
            return obj is System.Collections.IList &&
                   obj.GetType().IsGenericType &&
                   obj.GetType().GetGenericTypeDefinition() == typeof(List<>);
        }
    }
}
